package com.zenika.zenbinding.client.validator;

import com.zenika.zenbinding.client.exception.ValidatorException;

public class RangeValidator implements Validator {

	private Validator minValidator;
	private Validator maxValidator;

	public RangeValidator(String min, String max) {
		this.minValidator = new MinValidator(min);
		this.maxValidator = new MaxValidator(max);
	}

	public void validate(Object object) throws ValidatorException {
		this.minValidator.validate(object);
		this.maxValidator.validate(object);
	}

}
